package com.cskaoyan.user.utils;

import java.util.HashMap;

//

/**
 *  根据上传的类型获取.jpg  .png等后缀
 * @param null
 * @return
 * @author 杨宇健
 * @since 2022/12/29 11:21
 */
public class ContentTypeSuffixUtils {
    public static HashMap<String, String> typeMap;
    static {
        typeMap = new HashMap<>();
        typeMap.put("image/png", ".png");
        typeMap.put("image/jpeg", ".jpg");
    }
    public static String getSuffix(String type){
        return typeMap.get(type);
    }
}
